<template>
  <div>
    <div class="companyInfo">
      <el-form ref="form" :model="companyData" label-width="80px">
        <!-- 企业名称 -->
        <el-form-item label="企业名称">
          <el-input v-model="companyData.name" disabled />
        </el-form-item>

        <!-- 公司地址 -->
        <el-form-item label="公司地址">
          <el-input v-model="companyData.companyAddress" disabled />
        </el-form-item>

        <!-- 公司电话 -->
        <el-form-item label="公司电话">
          <el-input v-model="companyData.companyPhone" disabled />
        </el-form-item>

        <!-- 公司邮箱 -->
        <el-form-item label="公司邮箱">
          <el-input v-model="companyData.mailbox" disabled />
        </el-form-item>

        <!-- 备注 -->
        <el-form-item label="备注">
          <el-input v-model="companyData.remarks" disabled />
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script lang="js">
import { getCompanyInfoApi } from '@/api/setting.js'
export default {
  name: 'SetRole',
  data() {
    return {
      companyData: {}
    }
  },
  mounted() {
    this.getCompanyInfo()
  },
  methods: {
    async getCompanyInfo() {
      const res = await getCompanyInfoApi()
      this.companyData = res.data[0]
    }
  }
}
</script>

<style lang="scss" scope>
.companyInfo {
  margin: 30px 40px;
  width: 500px;
  .el-form-item {
    margin-bottom: 30px;
  }
}
</style>
